package ctn.hibernate.po;

// Generated 2011-12-8 2:29:36 by Hibernate Tools 3.2.4.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CtnCpaInfo generated by hbm2java
 */
@Entity
@Table(name = "ctn_cpa_info", catalog = "cpa")
public class CtnCpaInfo implements java.io.Serializable {

	private Long id;
	private String name;
	private String createUser;
	private Date createDate;
	private String infoDesc;
	private String status;
	private Set<CpaFun> cpaFuns = new HashSet<CpaFun>(0);
	private Set<CtnCpaVer> ctnCpaVers = new HashSet<CtnCpaVer>(0);
	private Set<CtnCpaOut> ctnCpaOuts = new HashSet<CtnCpaOut>(0);

	public CtnCpaInfo() {
	}

	public CtnCpaInfo(String name, String createUser, Date createDate,
			String infoDesc) {
		this.name = name;
		this.createUser = createUser;
		this.createDate = createDate;
		this.infoDesc = infoDesc;
	}

	public CtnCpaInfo(String name, String createUser, Date createDate,
			String infoDesc, String status, Set<CpaFun> cpaFuns,
			Set<CtnCpaVer> ctnCpaVers, Set<CtnCpaOut> ctnCpaOuts) {
		this.name = name;
		this.createUser = createUser;
		this.createDate = createDate;
		this.infoDesc = infoDesc;
		this.cpaFuns = cpaFuns;
		this.ctnCpaVers = ctnCpaVers;
		this.ctnCpaOuts = ctnCpaOuts;
		this.status=status;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}
	@Column(name = "STATUS", length = 10)
	public String getStatus() {
		return this.status;
	}
	
	public void setStatus(String status) {
		this.status = status;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "NAME", nullable = false, length = 50)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "CREATE_USER", nullable = false, length = 16)
	public String getCreateUser() {
		return this.createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATE", nullable = false, length = 19)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Column(name = "INFO_DESC", nullable = false, length = 2000)
	public String getInfoDesc() {
		return this.infoDesc;
	}

	public void setInfoDesc(String infoDesc) {
		this.infoDesc = infoDesc;
	}

	

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "ctnCpaInfo")
	public Set<CpaFun> getCpaFuns() {
		return this.cpaFuns;
	}

	public void setCpaFuns(Set<CpaFun> cpaFuns) {
		this.cpaFuns = cpaFuns;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "ctnCpaInfo")
	public Set<CtnCpaVer> getCtnCpaVers() {
		return this.ctnCpaVers;
	}

	public void setCtnCpaVers(Set<CtnCpaVer> ctnCpaVers) {
		this.ctnCpaVers = ctnCpaVers;
	}

	@OneToMany(fetch = FetchType.EAGER, mappedBy = "ctnCpaInfo")
	public Set<CtnCpaOut> getCtnCpaOuts() {
		return this.ctnCpaOuts;
	}

	public void setCtnCpaOuts(Set<CtnCpaOut> ctnCpaOuts) {
		this.ctnCpaOuts = ctnCpaOuts;
	}

}
